var g_cropSlider = null;

function createRightBottomToolContainer() {
    var html = "";
    var menu;
    for (var i = 0; i < rightBottomToolList.length; i++) {
        menu = rightBottomToolList[i];
        html += '<div id="' + menu.id + '" title = "'+menu.name+'" style = "background-color: #FFF;width: 40px;height: 40px;border-radius: 20px;margin-bottom: 8px;opacity: 0.9;cursor: pointer;text-align:center">'
        html += '<img style = "width: 25px;height: 25px;margin-top:7px" src="' + menu.icon + '"></div>'
    }
    $("#righrBottomToolDiv")[0].innerHTML += html;
}

function createToolMenuContainer() {
    var html = "";
    var menu;
    for (var i = 0; i < toolMenuList.length; i++) {
        menu = toolMenuList[i];
        if (menu.children.length > 0) {
            html += '<li class = "toolbarItem" style="float: left"><img style = "padding: 2px 4px 7px 5px;width: 30px;height: 30px;" src="' + menu.icon + '"><a id="' + menu.id + '" href="javascript:;" style = "margin: 0 5px;">' + menu.name + '</a><img class="ImgSty" src="img/general/downArrow.png">'
            if (i != toolMenuList.length - 1) {
                html += '<div style="float: right;width:1px;background-color: #ccc;height: 30px;margin: 2px 10px;"></div>'
            }
            html += ' <dl  class="toolbar-item-child" style="position: fixed;top: 45px;">'
            for (var j = 0; j < menu.children.length; j++) {
                html += ' <dd style = "margin:10px"><img src="' + menu.children[j].icon + '"><a id="' + menu.children[j].id + '" style = "margin: 0px 10px;">' + menu.children[j].name + '</a></dd>'
            }
            html += '</dl></li>'
        } else {
            if (menu.id == "3DPosionTool") {
                html += '<li class = "toolbarItem" style="float: left;width:135px !important"><img style = "padding: 2px 4px 7px 5px;width: 30px;height: 30px;" src="' + menu.icon + '"><a id="' + menu.id + '" href="javascript:;" style = "margin: 0 5px;">' + menu.name + '</a><img class="ImgSty" src="img/general/downArrow.png">'
                if (i != toolMenuList.length - 1) {
                    html += '<div style="float: right;width:1px;background-color: #ccc;height: 30px;margin:2px 0px"></div>'
                }
                html += '<div id="posionNavigationTool" style="">' +
                    '<div class="navigationToolContent navigationToolContentActive navigationToolContent1"><div id="city"></div><hr/><div id="street"></div></div>' +
                    '</div></li>';
                // html += '<div id="posionNavigationTool" style="">' +
                //     '<div class="navigationTool"><div targetid="navigationToolContent1" class="navigationToolPan navigationToolPanActive">行政区选择</div>' +
                //     '<div class="navigationToolPan" targetid="navigationToolContent2">兴趣点搜索</div></div>' +

                //     '<div class="navigationToolContent navigationToolContentActive navigationToolContent1"><div id="city"></div><hr/><div id="street"></div></div>' +
                //     '<div class="navigationToolContent navigationToolContent2" style="padding:5px;"><div class="layui-form-item">' +
                //     '    <div class="layui-input-block" style="margin-left: 5px;">' +
                //     '      <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入名称" class="layui-input navigationSearchIpt" style="margin-left: 5px;width: 286px;' +
                //     '    display: inline-block;">' +
                //     '<button type="button" style="display: inline-block;margin-top: -5px;width: 60px;" class="layui-btn layui-btn-normal layui-btn-sm navigationSearchBtn"><i class="layui-icon layui-icon-search" style="font-size: 30px; color: white;"></i></button></div>' +
                //     '</div>' +
                //     '<div class="navigationSearchPan"></div><div id="navigationSearchPage"></div></div>' +

                //     '</div>' +
                //     '</li>';
            } else {
                html += '<li class = "toolbarItem" style="float: left"><img style = "padding: 2px 4px 7px 5px;width: 30px;height: 30px;" src="' + menu.icon + '"><a id="' + menu.id + '" href="javascript:;" style = "margin: 0 5px;">' + menu.name + '</a>'
                if (i != toolMenuList.length - 1) {
                    html += '<div style="float: right;width:1px;background-color: #ccc;height: 30px;margin:2px 0px"></div></li>'
                } else {
                    html += '</li>';
                }
            }
        }
    }
    $("#navbar-nav-container")[0].innerHTML += html;
}

function toolbarsHTML() {
    var html = "";
    var menu;
    for (var i = 0; i < menuList.length; i++) {
        menu = menuList[i];
        html += '<li class="layui-nav-item"><a id="' + menu.id + '" href="javascript:;">' + menu.name + '</a>';
        if (menu.children.length > 0) {
            html += ' <dl class="layui-nav-child">'
            for (var j = 0; j < menu.children.length; j++) {
                html += ' <dd><a id="' + menu.children[j].id + '">' + menu.children[j].name + '</a></dd>'
            }
            html += '</dl>'
        }
    }
    $("#navbar-nav-container")[0].innerHTML += html;
    layui.use('element', function () {
        var element = layui.element;
        element.render('nav');
    })
}

function measureHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">三维量测</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content"><button type="button" id="distance" class="layui-btn layui-btn-sm layui-btn-normal">测距</button>'
    html += '<button type="button" id="distance2" class="layui-btn layui-btn-sm layui-btn-normal">测距（贴地）</button>'
    html += '<button type="button" id="area" class="layui-btn layui-btn-sm layui-btn-normal">测面</button>'
    html += '<button type="button" id="height" class="layui-btn layui-btn-sm layui-btn-normal">测高</button>'
    html += '<button type="button" id="clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button></div>'
    $("#measureContent").html(html)
}

function profileHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">剖面分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content">'
    html += '<button type="button" id="profileHandle" class="layui-btn layui-btn-sm layui-btn-normal">剖面</button>'
    html += '<button type="button" id="profileClear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button></div>'
        // html += '<div id="echartsView" style="bottom:40px;left:60px;height:300px;width:500px;background-color:red"></div>'
        //html += '<canvas style="position : absolute; right : 2%; bottom : 2%;background-color:rgba(65, 65, 65, 0.5)" id="pro" height="0" width="0"></canvas>'
    $("#profileContent").html(html)
}

function locationPickHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">位置拾取</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content" style="max-height: 190px;">'
    html += '<button type="button" style="margin-left: 64px;" id="locationPickHandle" class="layui-btn layui-btn-sm layui-btn-normal">拾取</button>'
    html += '<button type="button" id="locationPickClear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '<form id="locationPickForm" class="layui-form" style="display:none;margin-top: 6px;"><div class="layui-form-item"><label class="layui-form-label" style="width: 64px;">经度:</label>'
    html += '<div class="layui-input-block" style="width: 160px;margin-left: 70px;">'
    html += '  <input type="text" id="locationPickX" required  lay-verify="required" placeholder="经度" autocomplete="off" class="layui-input">'
    html += '</div><div>'
    html += '<div class="layui-form-item"><label class="layui-form-label" style="width: 64px;">纬度:</label>'
    html += '<div class="layui-input-block" style="width: 160px;margin-left: 70px;">'
    html += '  <input type="text" id="locationPickY" required  lay-verify="required" placeholder="纬度" autocomplete="off" class="layui-input">'
    html += '</div><div>'
    html += '<div class="layui-form-item"><label class="layui-form-label" style="width: 64px;">高程:</label>'
    html += '<div class="layui-input-block" style="width: 160px;margin-left: 70px;">'
    html += '  <input type="text" id="locationPickZ" required  lay-verify="required" placeholder="高程" autocomplete="off" class="layui-input">'
    html += '</div><div></form></div>'
    $("#locationPickContent").html(html)
}

function createFlyHtml() {
    var html = '';
    html += '<div class="head move">'
    html += '<span class="title">飞行模式</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '    <div class="fly3DPaths content" id="fly3DPaths" style="width:300px;">'
    html += '        <div class="fly3DPaths_tab" style="">'
    html += '            <ul style="margin-left:0px;" class="fly3DPaths_tab_ul">'
    html += '                <li id="overFlyClick" class="select"><span><span class="flss"></span><a href="javascript:void(0)">预设路线</a></span></li>'
    html += '                <li id="drawFlyCilck"><span><span class="flss"></span><a href="javascript:void(0);">手动绘制</a></span></li>'
    html += '            </ul>'
    html += '       </div>'
    html += '       <div id="overFlyPage" style="height: 100%;">'
    html += '           <div style="padding: 5px;margin-top: 5px;">'
    html += '               <div class="ydph-table-wrap">'
    html += '                   <div class="ydph-talbe-head">'
    html += '                      <table id="overFly_table" class="table table-bordered">'
    html += '                          <thead>'
    html += '                               <tr>'
    html += '                                   <th class="colspan2">名称</th>'
    html += '                                   <th class="colspan2">操作</th>'
    //html += '                                   <th class="colspan2">修改</th>'
    //html += '                                   <th class="colspan2">删除</th>'
    html += '                              </tr>'
    html += '                          </thead>'
    html += '                           <tbody></tbody>'
    html += '                       </table>'
    html += '                  </div>'
    html += '              </div>'
    html += '           </div>'
    html += '          </div>'
    html += '      <div id="drawFlyPage" style="height: 100%;text-align: center;display: none;margin-top: 10px;">'
    html += '           <div class="fly3DPaths_content">'
    html += '              <input id="draw_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="绘制">'
    html += '               <input id="start_Fly3DPaths" class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="飞行">'
    html += '               <input id="pause_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="暂停">'
    html += '               <input id="stop_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="退出"><br/>'
    html += '              <input id="playForward_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="向前">'
    html += '              <input id="playReverse_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="向后">'
    html += '               <input id="save_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="保存" style="">'
    html += '               <input id="clear_Fly3DPaths"  class="layui-btn layui-btn-sm layui-btn-normal" type="button" value="清空" style="">'
    html += '               <div id="range_speed" style="display:inline-block;width: 95%;margin-top: 20px;"></div>';
    html += '          </div>'
    html += '       </div>'
    html += '   </div>'
    html += '</div>'
    $("#flyContent").html(html);
    slider.render({
        elem: '#range_speed',
        min: 1,
        max: 50,
        step: 1,
        value: 6,
        change: function (value) {
            viewer.clock.multiplier = value / 10;
        }
    });
    // setTimeout(function() {
    //     viewer.scene.clock.multiplier = 0.6;
    // }, 2000);
}
function rollerShuttersHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">卷帘对比</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="tool-bar" class="param-container tool-bar content">'

    html += '<form class="layui-form">';
    html += '<div class="layui-form-item" style="margin-bottom:0px;"><label class="layui-form-label"   style="width: 58px;">图层</label>'
    html += '<div class="layui-input-block"  style="margin-left: 0px;display: inline-flex">'
    html += '  <select id="RollerShutterLayer" lay-filter="RollerShutterLayer">'
    html += '  </select>'
    html += '<button type="button" id="RollerShutterRefresh" style="margin-top: auto; margin-left: 10px;" class="layui-btn layui-btn-sm layui-btn-normal">刷新</button>'
    html += '</div></div>'

    html += '<div class="layui-form-item" style="margin-bottom:0px;"><label class="layui-form-label"  style="width: 58px;">位置</label>'
    html += '<div class="layui-input-block changeWidth"  style="margin-left: 58px;">'
    html += '  <select id="RollerShutterType" lay-filter="RollerShutterType">'
    html += '			<option value="-1" selected>左侧</option>'
    html += '			<option value="1">右侧</option>'
    html += '  </select>'
    html += '</div></div>'
    html += '<div class="layui-form-item" style="margin-bottom:0px;text-align: center;"><button type="button" id="RollerShutterHandle" class="layui-btn layui-btn-sm layui-btn-normal">对比</button><button type="button" id="RollerShutterClear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button></div>'
    html += '</form>';
    html += '</div>'
    $("#rollerShuttersContent").html(html);
}

function splitScreenHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">分屏模式</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="tool-bar" class="param-container tool-bar content">'
    html += '<div id="split_up" style="display: none;"></div>'
    html += '	<div id="split_bottom" style="display: none;"></div>'
    html += '	<div id="split_left" style="display: none;"></div>'
    html += '	<div id="split_right" style="display: none;"></div>'
    html += '	<div id="split_vertical_trisection_left" style="display: none;"></div>'
    html += '	<div id="split_vertical_trisection_right" style="display: none;"></div>'
    html += '	<div id="toolbar" class="param-container tool-bar layui-form">'
    html += '<div class="layui-form-item" style="margin-bottom:0px;">'
    html += '<label class="layui-form-label">模式</label>'
    html += '<div class="layui-input-block">'
    html += '  <select id="viewportType" lay-filter="viewportType">'
    html += '			<option value="NONE" selected>不使用分屏</option>'
    html += '			<option value="HORIZONTAL">水平分屏</option>'
    html += '			<option value="VERTICAL">垂直分屏</option>'
    html += '			<option value="TRIPLE">三视口</option>'
    html += '			<option value="VerticalTrisection">水平三视口</option>'
    html += '			<option value="QUAD">四视口</option>'
    html += '  </select>'
    html += '</div>'
    html += '</div>'
    html += '<div>'
    $("#splitScreenContent").html(html)
}

function InitDisplaySettingWin() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">显示设置</span>'
    html += '<span class="close headfun_win">'
    html += '    <img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '    <img src="img/page/fun/arrow_top.png" />'
    html += '</span>'
    html += '</div>'
    html += '<div class="content">'
    html += '<div class="container-fluid">'
    html += '   <div class="row">'
    html += '       <div class="col-xs-2">'
    html += '            <input type="checkbox" value="toolbar" checked />'
    html += '        </div>'
    html += '       <div class="col-xs-4">工具条</div>'
    html += '      <div class="col-xs-2">'
    html += '           <input type="checkbox" value="mapShadows" />'
    html += '       </div>'
    html += '       <div class="col-xs-4">地图阴影</div>'
    html += '   </div>'
    html += '</div>'
    html += '<div class="container-fluid">'
    html += '   <div class="row">'
    html += '       <div class="col-xs-2">'
    html += '           <input type="checkbox" value="mousePosition" checked/>'
    html += '       </div>'
    html += '       <div class="col-xs-4">鼠标位置</div>'
    html += '   </div>'
    html += '</div>'
    html += '<div id="color_toolbar">'
    html += '<table>'
    html += '<tbody><tr style="height: 40px;">'
    html += '<td  style="width: 60px;text-align: center;">亮度</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: brightness, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td  style="width: 60px;text-align: center;" >对比度</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: contrast, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td  style="width: 60px;text-align: center;"  >色调</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: hue, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td style="width: 60px;text-align: center;" >饱和度</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: saturation, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td style="width: 60px;text-align: center;" >伽马</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: gamma, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '</tbody></table>'
    html += '</div>'
    html += '</div>'
    $("#displaySettingWin").html(html)
}

function InitLoadDataWin() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">数据加载</span>'
    html += '<span class="close headfun_win">'
    html += '    <img src="img/page/fun/close.png" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win" id="closeNewYork">'
    html += '    <img src="img/page/fun/arrow_top.png" />'
    html += '</span>'
    html += '</div>'
    html += '<div class="content">'
    html += '<form class="layui-form" >'
    html += ' <table class="table_attributeQuery">'
    html += ' <tr><th class="th_attributeQuery">数据类型:</th>'
    html += '  <td class="td_attributeQuery">'
    html += '<select  class="loadDataType_select" > '
    html += '<option value="CZML">CZML</option>'
    html += '<option value="Tileset">Tileset</option>'
    html += '<option value="KML">KML</option>'
    html += '<option value="GeoJson">GeoJson</option>'
    html += '<option value="Gltf">Gltf</option>'
    html += '</select>'
    html += '</td></tr>'
    html += ' <tr><th class="th_attributeQuery">数据地址:</th>'
    html += ' <td class="td_attributeQuery"> <input type="text" class="loadDataUrl_text layui-input" style="width:190px;margin-top: 10px;"   placeholder="数据地址url" /></td></tr></table>'
    html += '<div  class="layui-form-item"  style="margin-bottom:0px;    margin-top: 10px;"  >'
    html += '<button type="button" class="sure_btn layui-btn layui-btn-sm layui-btn-normal" value="加载"  style="float:right;  margin-right: 25px;"  >加载</button>'
    html += '<button type="button" class="cansole_btn  layui-btn layui-btn-sm layui-btn-normal" value="取消"  style="float:right;margin-right: 15px;"    >取消</button>'
    html += '</div>'
    html += '</form>'
    html += '</div>'
    $("#loadDataWin").html(html)
}

function InitUserEntityWin() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">我的标签</span>'
    html += '<span class="close headfun_win">'
    html += '    <img src="img/page/fun/close.png" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win" id="">'
    html += '    <img src="img/page/fun/arrow_top.png" />'
    html += '</span>'
    html += '</div>'
    html += '<div class="content">'
    html += '<div class="container-fluid">'
    html += '    <div class="row" style="margin-left:0px;">'
    html += '       <div class="col-xs-8">'
    html += '           <input id="queryEntityName_text" type="text"  style="margin-top: 5px;" class="layui-input" id="entityname"'
    html += '               placeholder="标签名称">'
    html += '       </div>'
    html += '       <div class="col-xs-4"  style="margin-left: 3px" >'
    //html += '           <input id="queryEntity_btn" class="btn btn-sm layui-btn layui-btn-sm layui-btn-normal" type="button" value="搜索">'
    html += '            <input id="addentity_btn" class="btn btn-sm layui-btn layui-btn-sm layui-btn-normal" type="button" value="添加">'
    html += '       </div>'
    html += '   </div>'
    html += '   <hr />'
    html += '       <div id="LablePage" style="height: 100%;">'
    html += '           <div style="padding: 5px;margin-top: 5px;">'
    html += '               <div class="ydph-table-wrap">'
    html += '                   <div class="ydph-talbe-head">'
    html += '                      <table id="LablePage_table" class="table table-bordered"  style="width:240px;">'
    html += '                          <thead>'
    html += '                               <tr>'
    html += '                                   <th class="colspan2">名称</th>'
    html += '                                   <th class="colspan2">操作</th>'
    html += '                              </tr>'
    html += '                          </thead>'
    html += '                           <tbody></tbody>'
    html += '                       </table>'
    html += '                  </div>'
    html += '              </div>'
    html += '           </div>'
    html += '          </div>'
    //html += '   <div class="row" style="margin-left:0px;" >'
    //html += '        <div class="col-xs-4">'
    //html += '           <label>操作：</label>'
    //html += '       </div>'
    //html += '        <div class="col-xs-4">'
    //html += '            <input id="addentity_btn" class="btn btn-sm layui-btn layui-btn-sm layui-btn-normal" type="button" value="添加">'
    //html += '        </div>'
    //html += '        <div class="col-xs-4"  style="margin-left: 25px" >'
    //html += '            <input id="delentity_btn" class="btn btn-sm layui-btn layui-btn-sm layui-btn-normal" type="button" value="删除">'
    //html += '       </div>'
    //html += '    </div>'
    html += '</div>'
    html += '</div>'
    $("#userEntityWin").html(html)
}

function InitEntityModal() {
    var html = ''
    html += '<div class="modal-dialog" role="document" style="width:100%;height:100%;">'
    html += '<div class="modal-content" style="display:block;">'
    html += '   <div class="modal-header" style="color: white;font-weight: bolder;">'
    html += '        <h4 class="modal-title">添加标签信息</h4>'
    html += '        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>'

    html += '    </div>'
    html += '    <div class="modal-body">'
    html += '       <div class="row">'
    html += '            <div class="col-md-12">'
    html += '               <input id="entityname_text" type="text" class="form-control" id="entityName_modal" placeholder="标签名字">'
    html += '            </div>'
    html += '        </div>'
    html += '       <div class="row">'
    html += '           <div class="col-md-12">'
    html += '               <textarea id="entitydescription_text" class="form-control" rows="4" placeholder="标签内容" style="resize:none"></textarea>'
    html += '          </div>'
    html += '       </div>'
    html += '   </div>'
    html += '    <div class="modal-footer">'
    html += '       <button type="button" class="btn btn-default cansole_btn  layui-btn layui-btn-sm layui-btn-normal" data-dismiss="modal">取消</button>'
    html += '        <button type="button" class="btn btn-primary certain_btn  layui-btn layui-btn-sm layui-btn-normal">添加</button>'
    html += '   </div>'
    html += '</div>'
    html += '</div>'
    $("#entity_modal").html(html)
}

function InitLocationContent() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">定位</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="tool-bar" class="param-container tool-bar content">'

    html += '<form id="locationForm" class="layui-form" style="height: 310px;"><div class="layui-form-item" style="height: 290px;"><label class="layui-form-label">经度:</label>'
    html += '<div class="layui-input-block">'
    html += '  <input type="text" id="locationX" required lay-verify="required" placeholder="请输入经度" autocomplete="off" class="layui-input" value="109.78">'
    html += '</div><div>'

    html += '<div class="layui-form-item"><label class="layui-form-label">纬度:</label>'
    html += '<div class="layui-input-block">'
    html += '<input type="text" id="locationY" required  lay-verify="required" placeholder="请输入纬度" autocomplete="off" class="layui-input" value="39.60">'
    html += '</div><div>'

    html += '<div class="layui-form-item"><label class="layui-form-label">高程:</label>'
    html += '<div class="layui-input-block">'
    html += '<input type="text" id="locationZ"  placeholder="请输入高程" autocomplete="off" class="layui-input" value="2500">'
    html += '</div><div>'

    html += '<div class="layui-form-item"><label class="layui-form-label">方位角:</label>'
    html += '<div class="layui-input-block">'
    html += '<input type="text" id="locationHeading"  placeholder="请输入方位角" autocomplete="off" class="layui-input">'
    html += '</div><div>'

    html += '<div class="layui-form-item"><label class="layui-form-label">俯仰角:</label>'
    html += '<div class="layui-input-block">'
    html += '<input type="text" id="locationPitch"  placeholder="请输入俯仰角" autocomplete="off" class="layui-input" value="270">'
    html += '</div><div>'

    html += '<div class="layui-form-item"><label class="layui-form-label">滚动角:</label>'
    html += '<div class="layui-input-block">'
    html += '<input type="text" id="locationRoll"  placeholder="请输入滚动角" autocomplete="off" class="layui-input">'
    html += '</div><div>'

    html += '<div class="layui-form-item">'
    html += '<div class="layui-input-block">'
    html += '<button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="formDemo">定位</button>'
    html += '<button type="reset" class="layui-btn layui-btn-normal layui-btn-sm">重置</button>'
    html += '</div>'
    html += '</div>'
    html += '</form>'
    html += '</div>'
    $("#locationContent").html(html);
    $("#locationForm").submit(function(e) {
        LocationHandle();
        e.stopPropagation();
        return false;
    });
}

//淹没分析弹出Html
function floodHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">淹没分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content">'
    html += '<div class="form-group" style="line-height: 30px;display: flex;align-items: flex-end;"><button type="button" id="pick_height" class="layui-btn layui-btn-sm layui-btn-normal ">拾取高度值</button><div id="height_val" style="display: inline-block;margin-left: 40px;">高度值：</div></div>'
    html += '<div class="form-group" style="line-height: 30px;">'
    html += '<label class="form-label" style="display: inline-block;">最大高度(米):</label>'
    html += '<input id="maxHeight" value="1350" required="required" class="layui-input" style="float:right;display: inline-block;width:160px;"/>'
    html += '</div>'
    html += '<div class="form-group" style="line-height: 30px;">'
    html += '   <label  class="form-label" style="display: inline-block;">最小高度(米):</label>'
    html += '  <input id="minHeight" value="1300" required="required" class="layui-input" style="float:right;display: inline-block;width:160px;"/>'
    html += '</div>'
    html += ' <div class="form-group" style="line-height: 30px;">'
    html += ' <label class="form-label" style="display: inline-block;">淹没速度(米/秒):</label>'
    html += '  <input id="flood_speed" value="1" required="required" class="layui-input" style="float:right;display: inline-block;width:160px;"/>'
    html += '</div>'
    html += '  <div style="margin: 10px;text-align:center;">'
    html += '<button type="button" id="flood_draw"  class="layui-btn layui-btn-sm layui-btn-normal " >绘制淹没范围</button>'
    html += '<button type="button" id="flood_begin" class="layui-btn layui-btn-sm layui-btn-normal">开始</button>'
    html += '<button type="button" id="flood_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    html += '</div>'
    $("#floodContent").html(html)
}
//兴趣点查询绘制的工具条
function createInterestPointQueryToolbar(){
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">兴趣点查询</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html +='<div class="navigationToolContent navigationToolContentActive navigationToolContent2" style="height:360px;padding:5px;padding-top: 15px;margin-top:0px;background: #fff;"><div class="layui-form-item">' +
                    '    <div class="layui-input-block" style="margin-left: 5px;">' +
                    '      <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入名称" class="layui-input navigationSearchIpt" style="margin-left: 5px;width: 286px;' +
                    '    display: inline-block;">' +
                    '<button type="button" style="display: inline-block;margin-top: -5px;width: 60px;" class="layui-btn layui-btn-normal layui-btn-sm navigationSearchBtn"><i class="layui-icon layui-icon-search" style="font-size: 30px; color: white;"></i></button></div>' +
                    '</div>' +
                    '<div class="navigationSearchPan"></div><div id="navigationSearchPage"></div></div>'

    $("#intersetPointQueryDiv").html(html)
}
//空间查询绘制的工具条
function createSpatialQueryToolbar() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">空间查询</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += "<div class='content'>"
    html += '<form class="layui-form">'
        // html += "<div class=''><font></font><select class='select_attribute_selectLayer' style='width:63%;'></select></div>" +
        //     "<div>绘制类型：<div id='queryPoint' class='my-item'><img class='my-itemIcon' src='/img/query/drawTools/point.png' title='point'></div>" +
        //     "<div id='queryLine' class='my-item'><img class='my-itemIcon' src='/img/query/drawTools/line.png' title='line'></div>" +
        //     "<div id='queryPolygon' class='my-item'><img class='my-itemIcon' src='/img/query/drawTools/polygon.png' title='polygon'></div>" +
        //     "<div id='queryRectangle' class='my-item'><img class='my-itemIcon' src='/img/query/drawTools/rectangle.png' title='rectangle'></div>" +
        //     //"<div id='queryCircle' class='my-item'><img class='my-itemIcon' src='/img/query/drawTools/circle.png' title='circle'></div>" +
        //     //"<div id='closeQueryToolbar' class='my-item'><img class='my-itemIcon' src='/img/query/drawTools/clear.png' title='clear'></div>"+
        //     "</div>" +
        //     "<div>缓冲半径：<input id='bufferRadius' placeholder='请填写非负数或不填' style='color:black;width:180px;text-align:right;margin-right:20px;' />米</div>"
    html += '<table class="table_attributeQuery">  <tr>'
    html += ' <td class="th_attributeQuery" style="width:30%;"> 选择图层：</td>'
    html += '<td> <select id="select_attribute_selectLayer" class="select_attribute_selectLayer" lay-filter="select_attribute_selectLayer"></select>  </td></tr>'
    html += '<tr>  <td class="th_attributeQuery">绘制类型：</td>'
    html += "<td><div id='queryPoint' class='my-item'><img class='my-itemIcon' src='img/query/drawTools/point.png' title='point'></div>" +
        "<div id='queryLine' class='my-item'><img class='my-itemIcon' src='img/query/drawTools/line.png' title='line'></div>" +
        "<div id='queryPolygon' class='my-item'><img class='my-itemIcon' src='img/query/drawTools/polygon.png' title='polygon'></div>" +
        "<div id='queryRectangle' class='my-item'><img class='my-itemIcon' src='img/query/drawTools/rectangle.png' title='rectangle'></div></td>"
    html += '<tr> <td class="th_attributeQuery">缓冲半径： </td>'
    html += '<td   style="width:195px;" > <input id="bufferRadius" placeholder="选填项(单位：米)" style="width:190px"  class="layui-input" /></div></td></tr></table>'
    html += '</form>'
    html += "</div>"
        // html += "<form class='layui-form'>"

    // html += "<div class='layui-form-item'>"
    // html += "<label class='layui-form-label' style='padding:0;'>选择图层</label>"
    // html += "<div class='layui-input-block' style=''>"
    // html += "<select name='selectLayer' id='selectLayer' lay-filter='' style='width:140px;'>"
    // html += "<option value>选择行业类型</option>"
    // html += "<option value>选择行业类型2</option>"
    // html += "</select>"
    // html += "</div>"
    // html += "</div>"
    // // html += "</form>"

    // html += "<div class='layui-form-item'>"
    // html += "<label class='layui-form-label' style='padding:0;'>绘制类型</label>"
    // html += "<div class='layui-input-block' style=''>"
    // html += "<div id='queryPoint' class='my-item'>"
    // html += "<img class='my-itemIcon' src='/img/query/drawTools/point.png' title='point' style='width:24px;height:22px'>"
    // html += "</div>"
    // html += "<div id='queryLine' class='my-item'>"
    // html += "<img class='my-itemIcon' src='/img/query/drawTools/line.png' title='line' style='width:24px;height:22px'>"
    // html += "</div>"
    // html += "<div id='queryPolygon' class='my-item'>"
    // html += "<img class='my-itemIcon' src='/img/query/drawTools/polygon.png' title='polygon' style='width:24px;height:22px'>"
    // html += "</div>"
    // html += "<div id='queryRectangle' class='my-item'>"
    // html += "<img class='my-itemIcon' src='/img/query/drawTools/rectangle.png' title='rectangle' style='width:24px;height:22px'>"
    // html += "</div>"
    // html += "</div>"
    // html += "</div>"

    // html += "<div class='layui-form-item'>"
    // html += "<label class='layui-form-label' style='padding:0;'>缓冲半径</label>"
    // html += "<div class='layui-input-block' style=''>"
    // html += "<input id='bufferRadius' placeholder='请填写非负数或不填' class='layui-input' style='height:20px;width:140px;'/>"
    // html += "</div>"
    // html += "</div>"

    // html += "</form>"
    // html += "</div>"
    $("#spatialQueryDiv").html(html)
}

function pointArrsToStringForQuery(pointArrs) {
    var html = ''
    for (var i = 0; i < pointArrs.length; i++) {
        html += pointArrs[i][0] + ',' + pointArrs[i][1] + ' '
    }
    return html.substring(0, html.length - 1)
}


function pointStringsToArrayForQuery(string) {
    var arr = [];
    for (var i = 0 ; i < string.split(" ").length ; i++) {
        arr.push([string.split(" ")[i].split(",")[0], string.split(" ")[i].split(",")[1]]);
    }
    return arr;
}
//属性查询的工具条
function createAttributeQueryToolbar() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">属性查询</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content"  style="height:220px !important">'
    html += '<form class="layui-form" id="attributeQueryForm" style="height:200px">';
    html += '<div class="div_attributeQuery">'
    html += '<table class="table_attributeQuery">'
    html += '<tr><th class="th_attributeQuery">选择图层</th>'
    html += '<td class="td_attributeQuery"><select id="select_attributeQuery_selectLayer" class="select_attribute_selectLayer" lay-filter="select_attributeQuery_selectLayer"></select></td></tr>'
    html += '<tr><th class="th_attributeQuery">选择属性</th><td class="td_attributeQuery"><select id="select_attributeQuery_selectField" class="select_attribute_selectField"></select></td></tr>'
    html += '<tr><th class="th_attributeQuery">属性值</th><td class="td_attributeQuery"><input placeholder="多属性值查询请用,分隔" type="text" id="ipt_attributeQuery_value" style="margin-top: 10px;width:190px;" class="layui-input"></td></tr>'
    //html += '<tr><th class="th_attributeQuery">关系</th><td class="td_attributeQuery"><select id="select_attribute_selectOperate" class="select_attribute_selectOperate"><option>包含</option><option>等于</option><option>不等于</option><option>大于</option><option>大于等于</option><option>小于</option><option>小于等于</option></select></td></tr>'
    html += '<tr><th class="th_attributeQuery">关系</th><td class="td_attributeQuery"><select id="select_attribute_selectOperate" class="select_attribute_selectOperate"><option value="contains">包含</option><option value="equals">等于</option></select></td></tr>'
    html += '<tr><th class="th_attributeQuery"></th><td class="td_attributeQuery"><button class="layui-btn layui-btn-sm layui-btn-normal" style="width:30%;float:right;margin-top: 10px;margin-right: 20px;" id="attributeQueryButton">查询</button></td></tr></table></div>'
    html += '</form>'
    html += '</div>'
    $("#attributeQueryDiv").html(html);
    $('#attributeQueryForm').on('submit', function(event) {
        event.preventDefault(); //阻止form表单默认提交
        return false;
    })
}

//拉框查询的工具条
function createRectangleToolbar() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">拉框查询</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content">'
    html += '<div class="div_attributeQuery"><table class="table_attributeQuery"><tr><th class="th_attributeQuery">选择图层</th><td class="td_attributeQuery"><select id="select_attribute_selectLayer" class="select_attribute_selectLayer"></select></td></tr></table></div>'
    html += '</div>'
    $("#rectangleQueryDiv").html(html)
}

//单体化查询的工具条
function createDynamicMonomerToolbar() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">单体化</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content">'
    html += '<div class="div_attributeQuery"><table class="table_attributeQuery"><tr><th class="th_attributeQuery">选择图层</th><td class="td_attributeQuery"><select id="select_attribute_selectLayer" class="select_attribute_selectLayer"></select></td></tr></table></div>'
    html += '</div>'
    $("#dynamicMonomerQueryDiv").html(html)
}

//单体化点击模型时生成的图片的div
function showDynamicMonomerDiv() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title"></span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content">'
    html += '<blockquote id="bubble" class="bubble" style="visibility: hidden; bottom: 316px; left: 398px;"><font>呵呵</font><img id="myimg" src="" width="50%" height="auto"><h2 id="title"></h2><p id="des" class="word">建筑用材存放</p><audio controls="controls"><source src="" type="audio/mpeg">浏览器不支持音频</audio></blockquote>'
    html += '</div>'

    $("#dynamicMonomerDiv").html(html)
}

//查询结果展示表格创建
function createQueryTableDiv() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">查询结果</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="query content"><div id="queryTable" lay-filter="queryTable"></div></div>'
    $("#queryResult").html(html)
}

//绘制工具条创建
function createDrawToolbars() {
    var div = document.createElement("div");
    div.setAttribute("id", "toolbar");
    div.setAttribute("class", "my-toolbar");
    div.innerHTML = "<div class='my-itemDropDown'><div id='point' class='my-item'><img class='my-itemIcon' " +
        "src='/libs/SuperMap/images/point.png' title='point'></div><div id='line' class='my-item'><img class='my-itemIcon' " +
        "src='/libs/SuperMap/images/line.png' title='line'></div><div id='polygon' class='my-item'><img class='my-itemIcon' " +
        "src='/libs/SuperMap/images/polygon.png' title='polygon'></div></div>";
    document.getElementById("mainBody").appendChild(div);
}

//通视分析
function IntervisibilityHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">通视分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content"  style="text-align: center;">'
    html += '<button type="button" id="Intervisibility_chooseView" class="layui-btn layui-btn-sm layui-btn-normal">选择观察点</button>';
    html += '<button type="button" id="Intervisibility_addPoint" class="layui-btn layui-btn-sm layui-btn-normal">添加目标点</button>';
    html += '<button type="button" id="Intervisibility_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>';
    html += '</div>';
    $("#IntervisibilityContent").html(html);
}

//工具栏
function initAppleToolbar() {
    var content = "";
    if (toolbarList == null && toolbarList.length == 0) {
        showMsgLayer("工具栏菜单为空");
        return;
    }
    for (var i = 0; i < toolbarList.length; i++) {
        content += '<a id="' + toolbarList[i].id + '" class="dock-item" href="#"><img src="' + toolbarList[i].icon + '" alt="home" /><span>' + toolbarList[i].name + '</span><div></div></a>';
    }
    $(".dock-container").html(content);

    $('#dock').Fisheye({
        // maxWidth: 50,
        items: 'a',
        itemsText: 'div',
        container: '.dock-container',
        itemWidth: 50,
        proximity: 60,
        alignment: 'left',
        valign: 'bottom',
        halign: 'center'
    });
}

//可视域分析
function VisualfieldHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">视域分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content" style="text-align: center;" >'
    html += ' <button type="button" id="Visualfield_chooseView" class="layui-btn layui-btn-sm layui-btn-normal">绘制视域</button>'
    html += '<button type="button" id="Visualfield_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    html += '<div class="content" style="padding: 4px;min-height:10px;">'
    html += '<div id="wrapper" style="display:none;">'
    html += '    <div id="login" class="animate form">'
        //html += '        <span class="close" aria-hidden="true">×</span>'
    html += '        <form>'
    html += '             <h1>可视域属性</h1>'
    html += '             <p>'
    html += '             <div class="attribute_div">'
    html += '                  <label>方向(度)</label>'
    html += '                  <input   type="range" id="direction" min="0" max="360" step="1.0" title="方向" data-bind="value: direction, valueUpdate: \'input\'">'
    html += '                  <input  class="attribute_input"  type="text" size="5" data-bind="value: direction">'
    html += '             </div>'
    html += '             <div class="attribute_div">'
    html += '                  <label>翻转(度)</label> '
    html += '                  <input type="range" id="pitch" min="-90" max="90" step="1.0" value="1" title="翻转" data-bind="value: pitch, valueUpdate: \'input\'">'
    html += '                  <input  class="attribute_input" type="text" size="5" data-bind="value: pitch">'
    html += '             </div>'
    html += '             <div  class="attribute_div">'
    html += '                  <label>距离(米)</label>'
    html += '                  <input type="range" id="distance" min="1" max="500" step="1.0" value="1" title="距离" data-bind="value: distance, valueUpdate: \'input\' ">'
    html += '                  <input  class="attribute_input" type="text" size="5" data-bind="value: distance">'
    html += '              </div>'
    html += '             <div  class="attribute_div">'
    html += '                  <label>水平视场角(度)</label> '
    html += '                  <input type="range" id="horizonalFov" min="1" max="120" step="1" value="1" title="水平视场角" data-bind="value: horizontalFov, valueUpdate: \'input\'">'
    html += '                  <input class="attribute_input" type="text" size="5" data-bind="value: horizontalFov">'
    html += '             </div>'
    html += '             <div   class="attribute_div">'
    html += '                  <label>垂直视场角(度)</label>'
    html += '                  <input type="range" id="verticalFov" min="1" max="90" step="1.0" value="1" title="垂直视场角" data-bind="value: verticalFov, valueUpdate: \'input\'">'
    html += '                  <input class="attribute_input"  type="text" size="5" data-bind="value: verticalFov">'
    html += '             </div>'
    html += '             </p>'
    html += '             <p>'
    html += '             <div class="square">'
    html += '                  <label>可见区域颜色</label><input class="colorPicker" data-bind="value: visibleAreaColor,valueUpdate: \'input\'" id="colorPicker1"/>'
    html += '             </div>'
    html += '             <div class="square">'
    html += '                  <label>不可见区域颜色</label><input class="colorPicker" data-bind="value: invisibleAreaColor,valueUpdate: \'input\' " id="colorPicker2"/>'
    html += '             </div>'
    html += '             </p>'
    html += '         </form>'
    html += '     </div>'
    html += '</div>'
    html += '</div>'
    $('#VisualfieldContent').html(html)
}

//地形夸张
function TerrainExaggerateHtml() {
    var html = '';
    html += '<div class="head move">'
    html += '<span class="title">地形夸张</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content"  style="height:90px;">'
    html += '<div class="form-group" style="line-height: 30px;margin-bottom: 5px;">'
    html += '<label class="form-label" style="display: inline-block;">夸张系数:</label>'
    html += '<input id="TerrainExaggerateVal" type="number"  value="1" class="layui-input" style="float:right;display: inline-block;width:170px;heigt:30px;"/>'
    html += '</div>'
    html += '<div style=" text-align: center; ">'
    html += '    <button type="button" id="TerrainExaggerate_Excavation" style="margin-right: 15px" class="layui-btn layui-btn-sm layui-btn-normal">确定</button>'
    html += '</div>'
    html += '</div>';
    $('#terrainExaggerateContent').html(html)
}

//地形开挖
function TerrainexcavationHtml() {
    var html = '';
    html += '<div class="head move">'
    html += '<span class="title">地形开挖</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content"  style="height:90px;">'
    html += '<div class="form-group" style="line-height: 30px;margin-bottom: 5px;">'
    html += '<label class="form-label" style="display: inline-block;">开挖深度(米) :</label>'
    html += '<input id="depth" type="number"  value="50" class="layui-input" style="float:right;display: inline-block;width:170px;heigt:30px;"/>'
    html += '</div>'
    html += '<div style=" text-align: center; ">'
    html += '    <button type="button" id="Terrainexcavation_Excavation" style="margin-right: 15px" class="layui-btn layui-btn-sm layui-btn-normal">开挖</button>'
    html += '   <button type="button" id="Terrainexcavation_clear" style="margin-right: 15px" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    html += '</div>';
    $('#TerrainexcavationContent').html(html)
}

//天际线分析
function SkylineHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">天际线分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content"">'
    html += '<button type="button" id="Skyline_chooseView" class="layui-btn layui-btn-sm layui-btn-normal">提取天际线</button>'
    html += '<button type="button" id="Skyline_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    $('#SkylineContent').html(html)
}

//裁剪工具
function CropHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">模型裁剪</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content"">'
    html += '<form class="layui-form" action=""><table>'
        //html += '<tr><td style="text-align: center;padding-top: 12px;">大小</td><td><div id="range_crop_size" style="display:inline-block;width: 160px;margin-top: 20px;"></div></td></tr>';
        //html += '<tr><td style="text-align: center;padding-top: 12px;">角度</td><td><div id="range_crop_angle" style="display:inline-block;width: 160px;margin-top: 20px;"></div></td></tr>';
    html += '<tr><td style="text-align: center;padding-top: 12px;width: 100px;">方向</td><td>';
    html += '<select id="crop_type" lay-filter="crop_type" style="width:160px;"><option value="1">水平</option><option value="2">垂直</option></select></td></tr>';
    html += '<tr><td style="text-align: center;padding-top: 12px;">距离</td><td><div id="range_crop_distance" style="display:inline-block;width: 160px;margin-top: 20px;"></div></td></tr>';
    html += '      <tr style=" text-align: center;">'
    html += '          <td   colspan="2">'
    html += '              <button type="button" id="Crop_polygon" style="margin-right: 20px; margin-left: 10px;" class="layui-btn layui-btn-sm layui-btn-normal">绘制裁剪点</button>'
        // html += '          </td>'
        // html += '          <td>'
    html += '              <button type="button" id="Crop_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '          </td>'
    html += '      </tr>';
    html += '</table></form>'
    html += '</div>'
    $('#CropContent').html(html);
    form.render('select');
    form.on('select(crop_type)', function(data) {
        window.localStorage.setItem("crop_type", data.value);
        // 对于slider的操作
        // g_cropSlider.config.min = 0;
        // g_cropSlider.config.max = 100;
        // g_cropSlider.setValue();
    });
    window.localStorage.setItem("crop_type", "1");
    window.localStorage.setItem("range_crop_distance", 0);
    g_cropSlider = slider.render({
        elem: '#range_crop_distance',
        min: 0,
        max: 800,
        step: 1,
        value: 0,
        change: function(value) {
            window.localStorage.setItem("range_crop_distance", value);
        }
    });
}

//坡度坡向
function InitSlopeGradientHTML() {
    var html = '';
    html += '<div class="head move">'
    html += '<span class="title">坡度分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content" ">'
    html += '<div id="float" style="width: 250px;height: 40px;top: 15px;left: 1.5%;text-align:center;">'
    html += '   <button type="button" id="slopeGradientHandle" style=" margin-right: 15px" class="layui-btn layui-btn-sm layui-btn-normal">绘制</button>'
    html += '   <button type="button" id="slopeGradientClear" style=" margin-right: 15px" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    html += '</div>';
    $('#slopeGradientContent').html(html)
}

function profileHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">剖面分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div class="content" style="text-align:center">'
    html += '<form class="layui-form" > '
    html += '<div class="layui-form-item" style="margin-bottom: 0px"  > '
    html += '<lable  class="layui-form-label"   style="width: 100px;padding: 15px 15px;" >剖面对象：</lable>'
    html += '<div  class="layui-input-block chaageselect"  style="float: right;margin-left: 0px;     margin-right: 20px;"  >'
    html += '<select  id="SectionObject" >'
    html += '<option value="0"  >地形</option>'
    html += '<option value="1" >模型</option>'
    html += '</select>'
    html += '</form>'
    html += '<button type="button" id="profileHandle" style=" margin-top: 10px;" class="layui-btn layui-btn-sm layui-btn-normal">剖面</button>'
    html += '<button type="button" id="profileClear" style="  margin-top: 10px; "  class="layui-btn layui-btn-sm layui-btn-normal">清除</button></div>'
        //html += '<canvas style="position : absolute; right : 2%; bottom : 2%;background-color:rgba(65, 65, 65, 0.5)" id="pro" height="0" width="0"></canvas>'
    $("#profileContent").html(html)
}

//颜色设置
function colorsettingHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">颜色设置</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="color_toolbar" class="content">'
    html += '<table>'
    html += '<tbody><tr style="height: 40px;">'
    html += '<td>亮度</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: brightness, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td>对比度</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: contrast, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td>色调</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: hue, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td>饱和度</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: saturation, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '<tr style="height: 40px;">'
    html += '<td>伽马</td>'
    html += '<td>'
    html += '<input type="range" min="0" max="3" step="0.02" data-bind="value: gamma, valueUpdate: \'input\'">'
    html += '</td>'
    html += '</tr>'
    html += '</tbody></table>'
    html += '</div>'
    $("#colorsettingContent").html(html)
}

//日照分析
function sunshineHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">日照分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content">'
    html += '       <div class="param-item" style="display:none;">'
    html += '            <b>日期选择：</b>'
    html += '             <input  id="sunshine_selDate"  type="date"  style="width: 70%;display: inline" class="layui-input" />'
    html += '       </div>'
    html += '       <div class="param-item">'
    html += '             <b>开始时间：</b>'
    html += '             <select id="sunshine_startTime" style="display: inline;width: 70%;" class="layui-input">'
    html += '                    <option value="0">0:00</option>'
    html += '                    <option value="2">2:00</option>'
    html += '                    <option value="4">4:00</option>'
    html += '                    <option value="6">6:00</option>'
    html += '                    <option value="8">8:00</option>'
    html += '                    <option value="10" selected>10:00</option>'
    html += '                    <option value="12">12:00</option>'
    html += '                    <option value="14">14:00</option>'
    html += '                    <option value="16">16:00</option>'
    html += '                    <option value="18">18:00</option>'
    html += '                    <option value="20">20:00</option>'
    html += '                     <option value="22">22:00</option>'
    html += '              </select>'
    html += '         </div>'
    html += '       <div class="param-item">'
    html += '             <b>结束时间：</b>'
    html += '             <select id="sunshine_endTime" style=" display: inline;width: 70%;" class="layui-input">'
    html += '                    <option value="0">0:00</option>'
    html += '                    <option value="2">2:00</option>'
    html += '                    <option value="4">4:00</option>'
    html += '                    <option value="6">6:00</option>'
    html += '                    <option value="8">8:00</option>'
    html += '                    <option value="10" >10:00</option>'
    html += '                    <option value="12" selected>12:00</option>'
    html += '                    <option value="14">14:00</option>'
    html += '                    <option value="16">16:00</option>'
    html += '                    <option value="18">18:00</option>'
    html += '                    <option value="20">20:00</option>'
    html += '                     <option value="22">22:00</option>'
    html += '              </select>'
    html += '         </div>'
    html += '         <div class="param-item">'
    html += '              <button type="button" id="sunshine_sunlight_strat" class="layui-btn layui-btn-sm layui-btn-normal">播放</button>'
    html += '<button type="button" id="sunshine_sunlight_end" class="layui-btn layui-btn-sm layui-btn-normal">停止</button>'
    html += '              <button type="button" id="sunshine_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '          </div>'
    html += '</div>'
    $("#sunshineContent").html(html)
}

/**
 * 视频融合
 */
function videoSettingHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">视频融合</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="" class="param-container tool-bar content">'

    html += '<div id="toolbar" class="param-container tool-bar">'
    html += '<div class="param-item">'
    html += '    <b>宽度：</b>'
    html += '    <input type="range" id="video_horizontal" min="1" max="50" step="1" value="20">'
    html += '</div>'
    html += '<div class="param-item">'
    html += '    <b>高度：</b>'
    html += '    <input type="range" id="video_vertical" min="1" max="50" step="1" value="10">'
    html += '</div>'
    html += '<div class="param-item">'
    html += '    <b>方位角：</b>'
    html += '    <input type="range" id="video_direction" min="1" max="360" step="1" value="270">'
    html += '</div>'
    html += '<div class="param-item">'
    html += '    <b>俯仰角：</b>'
    html += '    <input type="range" id="video_pitch" min="1" max="360" step="1" value="270">'
    html += '</div>'
    html += '<div class="param-item">'
    html += '    <b>距离：</b>'
    html += '    <input type="range" id="video_distance" min="100" max="1000" step="1" value="200">'
    html += '</div>'
    html += '<div>'
    html += '    <label>'
    html += '        <input type="checkbox" id="visibleLine" style="display:inline-block; vertical-align: middle;" checked>'
    html += '        <span style="display:inline-block; vertical-align: middle;">显示视频投放线</span>'
    html += '    </label>'
    html += '</div>'
    html += '<button type="button" id="video_active" class="layui-btn layui-btn-sm layui-btn-normal">视频投放</button>'
    html += '<button type="button" id="video_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '<video id="video_trailer" style="display:none;" autoplay loop crossorigin controls muted>'
    html += '    <source src="data/mp4/test.mp4" type="video/mp4">'
    html += '</video>'
    html += '</div>'
    html += '</div>'
    $("#videoSettingContent").html(html);
}

/**
 * 视频投放
 */
function VideoDeliveryHTML() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">视频融合</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="" class="param-container tool-bar content">'

    html += '<form class="layui-form" action="" id="VideoDeliveryForm">'
    html += '<div class="layui-form-item" style="height: 30px;">'
    html += '  <label class="layui-form-label" style="font-size: 12px;">视频地址</label>'
    html += ' <div class="layui-input-block">'
    html += '   <input value="http://lwszcqyf.tpddns.cn:2082/vmp/api/v1/camera/getRtsp?indexCode=abde007c3d804f10a0ab682b34a9b4d1" type="text" style="width: 190px;" name="videoUrl" id="videoUrl" lay-verify="required|url" autocomplete="off" placeholder="请输入视频地址" class="layui-input">'
    html += '  </div>' 
    html += '</div>'

    html += '<div class="layui-form-item" style="height: 30px;">'
    html += '<label class="layui-form-label" style="font-size: 12px;">视频格式</label>'
    html += '<div class="layui-input-block">'
    html += '  <select name="videoType" lay-filter="videoType" id="videoType" >'
    html += '    <option value="video/mp4">RTSP</option>'
    html += '  </select>'
    html += '</div>'
    html += '</div>'

    html += '<div class="layui-form-item" style="text-align:center;height: 30px;">'
    html += '<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="" lay-filter="videoDelivery">绘制</button>'
    html += '<button type="reset" class="layui-btn layui-btn-normal layui-btn-sm">重置</button>'
    html += '<button class="layui-btn layui-btn-normal layui-btn-sm" id="videoDeliveryClear">清除</button>'
    html += '</div>'

    html += '</form>'
    html += '</div>'
    $("#VideoDeliveryContent").html(html);
    $("#VideoDeliveryForm").submit(function(e) {
        VideoDeliveryHandle();
        e.stopPropagation();
        return false;
    });
}

/**
 * 
 */
function createOlMapContent() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">二三维联动</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="" class="param-container tool-bar content">'

    html += '<form id="olMapForm" class="layui-form"><div class="layui-form-item">'
    html += '<label class="layui-form-label" style="font-size:12px;">联动</label>'
    html += '<div class="layui-input-block">'
    html += '  <input type="checkbox" name="switch" lay-skin="switch" lay-text="开启|关闭"  lay-filter="switchLinkage" >'
    html += '</div>'
    html += '</form>'
    html += '<div id="olMap" style="width:400px;height:200px;border: 1px solid #dddddd;"></div>'
    html += '</div>'
    $("#olMapContent").html(html)
}

function InitEditWFSContent() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">WFS数据编辑</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="" class="param-container tool-bar content" style="overflow: auto;max-height: 500px;">'
    html += '<form id="wfsEditerForm" class="layui-form"><div class="layui-form-item">'
    html += '<div class="layui-input-block" id="MapContainer" style="margin-left: 10px;">'
    html += '</div>'
    html += '</form>'
    html += '</div>'
    $("#editWFSContent").html(html);
}

function InitDrawContent() {
    var html = ''
    html += '<div class="head move" style="">'
    html += '<span class="title">标绘</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭"/>'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="" class="param-container tool-bar content" style="overflow: auto;max-height: 500px;">'

    html += '<div style="left:10px;top:10px;background-color:transparent;">'
    html += '<input id="drawPoint" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="点" style="display:none" />'
    html += '<input id="drawPolyline" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="线" style="display:none"  />'
    html += '<input id="drawPolygon" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="面"style="display:none"  />'
    html += '<input id="drawRectangle" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="矩形" style="display:none" />'
    html += '<input id="drawCircle" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="圆" style="display:none" />'
    html += '<input id="drawBufferLine" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="缓冲区" style="display:none" />'
    html += '</div>';
    html += '<div style="left:10px;top:90px;background-color:transparent;">'
    html += '<input id="drawLabelPoint" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="文字标注" style="display:none" />'
    html += '<input id="straightArrow" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="直线箭头" style="display:none" />'
    html += '<input id="attackArrow" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="攻击箭头"style="display:none"  />'
    html += '<input id="pincerArrow" type="button" class="layui-btn layui-btn-sm layui-btn-normal" value="钳击箭头"style="display:none"  />'
    html += '</div>';
    html += '</div>';
    $("#drawContent").html(html)
}
//等高线分析
function ContourContent() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">等高线分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content">'
    html += '<div id="toolbar" >';
    html += '      <div class="demo-container"style="display:none;">';
    html += '          <label style="display: inline"><input type="radio" name="shadingMaterials" value="none" data-bind="checked: selectedShading"> No shading</label>';
    html += '          <label style="display: inline"><input type="radio" name="shadingMaterials" value="elevation" data-bind="checked: selectedShading"> Elevation</label>';
    html += '          <label style="display: inline"><input type="radio" name="shadingMaterials" value="slope" data-bind="checked: selectedShading"> Slope</label>';
    html += '          <label style="display: inline"><input type="radio" name="shadingMaterials" value="aspect" data-bind="checked: selectedShading"> Aspect</label>';
    html += '       </div>';
    html += '       <div class="demo-container"> ';
    html += '           <div>';
    html += '                <label style="display: inline-block;"><input type="checkbox" data-bind="checked: enableContour">&nbsp&nbsp&nbsp显示等高线</label><div id="pickColor"  style="display: inline-block;margin-left:25px;"></div>';
    html += '           </div>';
    html += '           <div>';
    html += '                <label>间距<input style="width: 136px;display:initial;margin:12px;" type="range" min="1.0" max="100.0" step="1.0" data-bind="value: contourSpacing, valueUpdate: \'input\', enable: enableContour"> <span data-bind="text: contourSpacing"></span>m</label>';
    html += '           </div>';
    html += '           <div>';
    html += '                <label>线宽<input style="width: 136px;display:initial;margin:12px;" type="range" min="1.0" max="10.0" step="1.0" data-bind="value: contourWidth, valueUpdate: \'input\', enable: enableContour"> <span data-bind="text: contourWidth"></span>px</label>';
    html += '           </div>';
    html += '        </div>';
    html += '</div>';
    html += '</div>';
    $("#contourContent").html(html);
}

function Draw3DContent() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">几何标绘</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content">'

    html += '<div id="toolbar_draw3D" class="param-container tool-bar">'
    html += '<button type="button" id="cylinder" class="layui-btn layui-btn-sm layui-btn-normal">添加圆柱</button>'
    html += '<button type="button" id="cuboid" class="layui-btn layui-btn-sm layui-btn-normal">添加长方体</button>'
    html += '<button type="button" id="sphere" class="layui-btn layui-btn-sm layui-btn-normal">添加球体</button>'
    html += '<button type="button" id="cone" class="layui-btn layui-btn-sm layui-btn-normal">添加锥体</button>'
    html += '<button type="button" id="clear_draw3D" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    html += '<div id="popup_draw3D" class="popup-container">'
        // html += '<div class="popup-header">'
        // html += '    <label class="header-title">对象编辑</label>'
        // html += '</div>'
    html += '<div class="popup-content">'
    html += '    <table id="setbar_ellipse" style="display: none;">'
    html += '        <tbody>'
    html += '        <tr style="height: 30px;">'
    html += '            <td>短半轴</td>'
    html += '           <td>'
    html += '                <input type="range" min="10" max="100" step="1" data-bind="value: semiMinorAxis, valueUpdate: \'input\'">'
    html += '            </td>'
    html += '            <td>'
    html += '                <input type="text" size="5" data-bind="value: semiMinorAxis">'
    html += '            </td>'
    html += '       </tr>'
    html += '       <tr style="height: 30px;">'
    html += '            <td>长半轴</td>'
    html += '           <td>'
    html += '                <input type="range" min="10" max="200" step="1" data-bind="value: semiMajorAxis, valueUpdate: \'input\'">'
    html += '            </td>'
    html += '            <td>'
    html += '               <input type="text" size="5" data-bind="value: semiMajorAxis">'
    html += '            </td>'
    html += '        </tr>'
    html += '        <tr  style="height: 30px;">'
    html += '            <td>拉伸高度</td>'
    html += '            <td>'
    html += '                <input type="range" min="10" max="100" step="10" data-bind="value: extrudedHeight, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '             <td>'
    html += '                <input type="text" size="5" data-bind="value: extrudedHeight">'
    html += '            </td>'
    html += '       </tr>'
    html += '       <tr  style="height: 30px;">'
    html += '            <td>粒度</td>'
    html += '            <td>'
    html += '                <input type="range" min="0.5" max="2" step="0.1" data-bind="value: granularity, valueUpdate: \'input\'">'
    html += '               </td>'
    html += '               <td>'
    html += '               <input type="text" size="5" data-bind="value: granularity">'
    html += '           </td>'
    html += '       </tr>'
    html += '        <tr  style="height: 30px;">'
    html += '            <td>旋转</td>'
    html += '           <td>'
    html += '               <input type="range" min="0" max="90" step="0.1" data-bind="value: rotation, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '             <td>'
    html += '               <input type="text" size="5" data-bind="value: rotation">'
    html += '           </td>'
    html += '       </tr>'
    html += '        <tr  style="height: 30px;">'
    html += '           <td>模式</td>'
    html += '           <td>'
    html += '               <input  type="checkbox" data-bind="checked: ellipseFill">'
    html += '                填充'
    html += '                <input  type="checkbox" data-bind="checked: ellipseOutline">'
    html += '                线框'
    html += '            </td>'
    html += '        </tr>'
    html += '        <tr style="height: 30px;">'
    html += '            <td>颜色</td>'
    html += '            <td>'
    html += '                <input  type="text" size="10" data-bind="value: ellipseMaterial,valueUpdate: \'input\'" style="width: 200px;height: 30px;" id="colorPicker_ellipse">'
    html += '            </td>'
    html += '       </tr>'
    html += '       </tbody>'
    html += '   </table>'
    html += '   <table id="setbar_box" style="display: none;">'
    html += '       <tbody>'
    html += '       <tr style="height: 30px;">'
    html += '           <td>长</td>'
    html += '           <td>'
    html += '               <input type="range" min="10" max="100" step="1" data-bind="value: boxLength, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '               <input type="text" size="5" data-bind="value: boxLength">'
    html += '            </td>'
    html += '        </tr>'
    html += '        <tr style="height: 30px;">'
    html += '            <td>宽</td>'
    html += '   <td>'
    html += '       <input type="range" min="10" max="100" step="1" data-bind="value: boxWidth, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '       <input type="text" size="5" data-bind="value: boxWidth">'
    html += '   </td>'
    html += '</tr>'
    html += '<tr style="height: 30px;">'
    html += '   <td>高</td>'
    html += '   <td>'
    html += '       <input type="range" min="10" max="100" step="1" data-bind="value: boxHeight, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '       <input type="text" size="5" data-bind="value: boxHeight">'
    html += '   </td>'
    html += '</tr>'
    html += '<tr style="height: 30px;">'
    html += '   <td>模式</td>'
    html += '   <td>'
    html += '       <input  type="checkbox" data-bind="checked: boxFill">'
    html += '       填充'
    html += '       <input  type="checkbox" data-bind="checked: boxOutline">'
    html += '       线框'
    html += '   </td>'
    html += ' </tr>'
    html += '<tr style="height: 30px;">'
    html += '           <td>颜色</td>'
    html += '           <td>'
    html += '               <input   type="text" size="10" data-bind="value: boxMaterial,valueUpdate: \'input\'" style="width: 200px;height: 30px;" id="colorPicker_box">'
    html += '           </td>'
    html += '       </tr>'
    html += '        </tbody>'
    html += '    </table>'
    html += '    <table id="setbar_ellipsoid" style="display: none;">'
    html += '        <tbody>'
    html += '       <tr style="height: 30px;">'
    html += '            <td>X半径</td>'
    html += '           <td>'
    html += '               <input type="range" min="10" max="100" step="1" data-bind="value: xRadii, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '               <input type="text" size="5" data-bind="value: xRadii">'
    html += '           </td>'
    html += '       </tr>'
    html += '       <tr style="height: 30px;">'
    html += '            <td>Y半径</td>'
    html += '           <td>'
    html += '               <input type="range" min="10" max="100" step="1" data-bind="value: yRadii, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '               <input type="text" size="5" data-bind="value: yRadii">'
    html += '           </td>'
    html += '       </tr>'
    html += '       <tr style="height: 30px;">'
    html += '            <td>Z半径</td>'
    html += '           <td>'
    html += '                <input type="range" min="10" max="100" step="1" data-bind="value: zRadii, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '               <input type="text" size="5" data-bind="value: zRadii">'
    html += '           </td>'
    html += '       </tr>'
    html += '       <tr style="height: 30px;">'
    html += '           <td>模式</td>'
    html += '           <td>'
    html += '                <input  type="checkbox" data-bind="checked: ellipsoidFill">'
    html += '                填充'
    html += '                <input  type="checkbox" data-bind="checked: ellipsoidOutline">'
    html += '                线框'
    html += '           </td>'
    html += '        </tr>'
    html += '       <tr style="height: 30px;">'
    html += '           <td>颜色</td>'
    html += '          <td>'
    html += '               <input  type="text" size="10" data-bind="value: ellipsoidMaterial,valueUpdate: \'input\'" style="width: 200px;height: 30px;" id="colorPicker_ellipsoid">'
    html += '           </td>'
    html += '      </tr>'
    html += '      </tbody>'
    html += '    </table>'
    html += '    <table id="setbar_cylinder" style="display: none;">'
    html += '        <tbody>'
    html += '       <tr style="height: 30px;">'
    html += '           <td>长度</td>'
    html += '           <td>'
    html += '               <input type="range" min="10" max="100" step="1" data-bind="value: cylinderLength, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '               <input type="text" size="5" data-bind="value: cylinderLength">'
    html += '           </td>'
    html += '       </tr>'
    html += '       <tr style="height: 30px;">'
    html += '          <td>底部半径</td>'
    html += '           <td>'
    html += '               <input type="range" min="10" max="100" step="1" data-bind="value: bottomRadius, valueUpdate: \'input\'">'
    html += '             </td>'
    html += '              <td>'
    html += '               <input type="text" size="5" data-bind="value: bottomRadius">'
    html += '           </td>'
    html += '       </tr>'
    html += '        <tr style="height: 30px;">'
    html += '   <td>模式</td>'
    html += '   <td>'
    html += '       <input  type="checkbox" data-bind="checked: cylinderFill">'
    html += '       填充'
    html += '       <input  type="checkbox" data-bind="checked: cylinderOutline">'
    html += '       线框'
    html += '   </td>'
    html += '</tr>'
    html += '<tr>'
    html += '   <td>颜色</td>'
    html += '   <td>'
    html += '       <input  type="text" size="10" data-bind="value: cylinderMaterial,valueUpdate: \'input\'" style="width: 200px;height: 30px;" id="colorPicker_cylinder">'
    html += '   </td>'
    html += '</tr>'
    html += '</tbody>'
    html += '</table>'
    html += '</div>'
    html += '<div class="popup-footer" style="display:none;">'
    html += '    <a id="closeBtn" class="popup-ok">关闭</a>'
    html += '</div>'
    html += '</div>'

    html += '</div>';
    $("#draw3DContent").html(html)
}
//填挖方分析
function FillandCutContent() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">填挖方分析</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content" style="height:240px;">'
    html += '<div class="form-group" style="line-height: 30px;margin-bottom: 15px;">'
    html += '<label class="form-label" style="display: inline-block;">开挖高度(米) :</label>'
    html += '<input value="20" type="number" id="excavateHeight_input" type="text" class="layui-input" style="display: inline-block;width: 150px;margin-left: 15px;float: right;height: 30px;"/>'
    html += '</div>'
    html += '<div class="form-group" style="line-height: 30px;margin-bottom: 15px;">'
    html += '<label class="form-label" style="display: inline-block;">填埋高度(米) :</label>'
    html += '<input value="50" type="number" id="buryHeight_input" type="text" class="layui-input" style="display: inline-block;width: 150px;margin-left: 15px;float: right;height: 30px;" />'
    html += '</div>'
    html += '<div class="form-group" style="line-height: 30px;margin-bottom: 15px;">'
    html += '<label class="form-label" style="display: inline-block;">挖方体积(立方米) :</label>'
    html += '<input id="excavateVolumes_input" type="text" class="layui-input" readonly  style="display: inline-block;width: 150px;margin-left: 15px;float: right;height: 30px;"/>'
    html += '</div>'
    html += '<div class="form-group" style="line-height: 30px;margin-bottom: 10px;">'
    html += '<label class="form-label" style="display: inline-block;">填方体积(立方米) :</label>'
    html += '<input id="buryVolumes_input" type="text" class="layui-input" readonly  style="display: inline-block;width: 150px;margin-left: 15px;float: right;height: 30px;"/>'
    html += '</div>'
    html += '<div class="form-group" style="text-align:center;">'
    html += '<button type="button" id="FillandCut_draw" class="layui-btn layui-btn-sm layui-btn-normal">绘制</button>';
    html += '<button type="button" id="FillandCut_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>';
    html += '</div>'
    html += '</div>'
    $("#fillandcutContent").html(html)
}
//雨雪雾
function rainSnowFogHtml() {
    var html = "";
    html += '<div class="head move">'
    html += '<span class="title">雨雪雾</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div  class="content" style="text-align:center;">'
    html += '<button type="button" id="rain" class="layui-btn layui-btn-sm layui-btn-normal">雨</button>'
    html += '<button type="button" id="snow" class="layui-btn layui-btn-sm layui-btn-normal">雪</button>'
    html += '<button type="button" id="fog" class="layui-btn layui-btn-sm layui-btn-normal">雾</button>'
    html += '<button type="button" id="rainSnowFog_clear" class="layui-btn layui-btn-sm layui-btn-normal">清除</button>'
    html += '</div>'
    $('#rainSnowFogContent').html(html);
}
//应用分析结果窗口
function createAnalysisResultsContent(){
    var html = '';
    html += 
        `
        <div class="loadingAnalysisResult">
        <img src="../../BasePlatform/Visualization/font/loading.gif" style=" width: 220px; height: 150px;opacity: 0.85;" />
        </div>
        <div class="analysisResultContentDiv layui-form">
            <div class="topContentDiv">
                <div class="topTitle">分析结果</div>
                <div class="topContent">
                    <select id="select_analysis_type" class="select_attribute_selectLayer" lay-filter="select_analysis_type"></select>
                    <button type="button" id="btn_export_resTable" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm btnExport">导出</button>
                    <div class="closeAnalysisResultWin headfun_win"><img src="img/page/fun/close.png" title="关闭" /></div>
                </div>
            </div>
            <hr>
            <div style="position: absolute;width: 100%;height: calc(100% - 80px);padding-right: 20px;">
                <div id="noSerializeInfo" class="bottomNodatasText bottomContentNew">
                    该分析因子暂无数据！
                </div>
                <div id="noModelInfo" class="bottomNodatasText bottomContentNew">
                    该分析因子在当前分析区域内暂无数据！
                </div>
                <div id="analysize_bottom" class="bottomContentNew bottomContentShow">
                    <div class="leftContent" id="statisDirectionDIV">
                        <div class="leftTitle">
                            <div>
                                <span style="font-weight: bold; font-size: 18px;"><img
                                        src="/img/BasePlatform/dataledger/icon.png" style="margin:0 5px" />统计描述</span>
                            </div>
                            <div class="leftTopContent">
                                
                            </div>
                        </div>
                        <div class="descriptionDIV" id="descriptionDIV">
                        
                        </div>
                    </div>
                    <div id="dividerLine" style = "display:none; width:1px;height:100%;border: 1px solid #ccc;"></div>
                    <div class="leftContentNew">
                        <div class = "leftTitle">
                            <div>
                                <span style="font-weight: bold; font-size: 18px;"><img src="/img/BasePlatform/dataledger/icon.png" style="margin:0 5px" />统计表</span>
                            </div>
                            <div class = "leftTopContent">
                                <select id="select_demission_type" class="select_attribute_selectLayer" lay-filter="select_demission_type">
                                </select>
                                <button type="button" id="btn_change_table" onclick='ChangeFun()' title="表格" class="layui-btn layui-btn-primary layui-btn-sm" style="border: none;"><i class="layui-icon" id="showTableIcon" >&#xe62d;</i><i class="layui-icon" id="showChartsIcon" style="display: none">&#xe629;</i></button>
                            </div>
                        </div>
                        <div class = "leftChartsAndTable" id = "leftChartsAndTable">
                            
                        </div>
                    </div>
                    <div style = "width:1px;height:100%;border: 1px solid #ccc;"></div>
                    <div id="rightTableDIV" class="rightContent">
                        <div class = "leftTitle">
                            <div>
                                <span style="font-weight: bold; font-size: 18px;"><img src="/img/BasePlatform/dataledger/icon.png" style="margin:0 5px" />详细列表</span>
                            </div>
                            <div class = "leftTopContent">
                                <button type="button" id="btn_show_all" title="全部" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm">全部</button>
                            </div>
                        </div>
                        <div class = "rightTableContent" style = "overflow:hidden">
                            <table id="resultDetailTable" lay-filter="resultDetailTable"></table>
                        </div>
                    </div>
                </div>
            </div>
            
        </div>`
    $("#AnalysisResultsContent").html(html);
}
/**
 * 创建地图故事
 */
function InitMapStoryContent() {
    var html = ''
    html += '<div class="head move">'
    html += '<span class="title">创建地图故事</span>'
    html += '<span class="close headfun_win">'
    html += '<img src="img/page/fun/close.png" title="关闭" />'
    html += '</span>'
    html += '<span class="toggle_win headfun_win open">'
    html += '<img src="img/page/fun/arrow_top.png" />'
    html += '</span></div>'
    html += '<div id="" class="param-container tool-bar content">'

    html += '<form id="mapStoryForm" class="layui-form" style="height: 360px;"><div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">名称:</label>'
    html += '<div class="layui-input-block">'
    html += '  <input type="text" id="mapStoryFormTitle" lay-verify="required" placeholder="请输入故事名称" autocomplete="off" class="layui-input" value="">'
    html += '</div></div>'

    html += '<div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">视图:</label>'
    html += '<div class="layui-input-block">'
    html += '<button class="layui-btn layui-btn-normal layui-btn-sm">选取当前视图</button>'
    html += '</div></div>'

    html += '<div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">路线:</label>'
    html += '<div class="layui-input-block">'
    html += '<button id="storyDrawPolyline" class="layui-btn layui-btn-normal layui-btn-sm">绘制故事路线</button>'
    html += '</div></div>'

    html += '<div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">标绘:</label>'
    html += '<div class="layui-input-block">'
    html += '<button id="storyDrawPoint" class="layui-btn layui-btn-normal layui-btn-sm">添加故事标绘</button>'
    html += '</div></div>'

    html += '<div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">图片:</label>'
    html += '<div class="layui-input-block">'
    html += '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="storyImageUpload"><i class="layui-icon">&#xe67c;</i>上传图片</button>'
    html += '<i id="storyImageUploadList" class="layui-icon" style="display:none;position: relative;left: 10px;top: 5px;cursor: pointer;" title="图片列表">&#xe656;</i></div></div>'

    html += '<div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">视频:</label>'
    html += '<div class="layui-input-block">'
    html += '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="storyVideoUpload"><i class="layui-icon">&#xe67c;</i>上传视频</button>'
    html += '<i id="storyVideoUploadList" class="layui-icon" style="display:none;position: relative;left: 10px;top: 5px;cursor: pointer;" title="视频列表">&#xe656;</i></div></div>'

    html += '<div class="layui-form-item" style="height: 30px;"><label class="layui-form-label">内容:</label>'
    html += '<div class="layui-input-block">'
    html += '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="storyModelUpload"><i class="layui-icon">&#xe67c;</i>文件上传</button>'
    html += '<i id="storyModelUploadList" class="layui-icon" style="display:none;position: relative;left: 10px;top: 5px;cursor: pointer;" title="视频列表">&#xe656;</i></div></div>'

    html += '<div class="layui-form-item" style="height: 30px;">'
    html += '<div class="layui-input-block" style="margin-top: 10px;">'
    html += '<button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="" id="mapStoryFormSubmit">保存</button>'
    html += '<button type="reset" class="layui-btn layui-btn-normal layui-btn-sm">重置</button>'
    html += '</div>'
    html += '</div>'

    html += '</form>'
    html += '</div>'
    $("#mapStoryContent").html(html);
    $("#mapStoryForm").submit(function(e) {
        e.stopPropagation();
        return false;
    });
    upload.render({
        elem: '#storyImageUpload',
        multiple: true,
        auto: false,
        bindAction: "#storyImageUploadList",
        done: function(res) {
            $("#storyImageUploadList").show();
        },
        error: function() {}
    });
    upload.render({
        elem: '#storyVideoUpload',
        multiple: true,
        accept: "video",
        auto: false,
        bindAction: "#storyVideoUploadList",
        done: function(res) {
            $("#storyVideoUploadList").show();
        },
        error: function() {}
    });
    upload.render({
        elem: '#storyModelUpload',
        multiple: true,
        accept: "file",
        auto: false,
        bindAction: "#storyModelUploadList",
        done: function(res) {
            $("#storyVideoUploadList").show();
        },
        error: function() {}
    });
    $("#mapStoryFormSubmit").click(function() {
        if ($("#mapStoryFormTitle").val()) {
            var index = layer.load(0, { time: 1000 * 1000 }); //又换了种风格，并且设定最长等待10秒 
            setTimeout(function() {
                layer.close(index);
                showMsgLayer("保存成功！");
            }, 2500);
        }
    });
}

